\(\int \sqrt {a+\frac {b}{x^2}} \, dx\) [1894]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 42 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\sqrt {a+\frac {b}{x^2}} x-\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b}}{\sqrt {a+\frac {b}{x^2}} x}\right ) \]

[Out]

-arctanh(b^(1/2)/x/(a+b/x^2)^(1/2))*b^(1/2)+(a+b/x^2)^(1/2)*x

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {248, 283, 223, 212} \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=x \sqrt {a+\frac {b}{x^2}}-\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b}}{x \sqrt {a+\frac {b}{x^2}}}\right ) \]

[In]

Int[Sqrt[a + b/x^2],x]

[Out]

Sqrt[a + b/x^2]*x - Sqrt[b]*ArcTanh[Sqrt[b]/(Sqrt[a + b/x^2]*x)]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 248

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rule 283

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^p/(c*(m + 1
))), x] - Dist[b*n*(p/(c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {\sqrt {a+b x^2}}{x^2} \, dx,x,\frac {1}{x}\right ) \\ & = \sqrt {a+\frac {b}{x^2}} x-b \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\frac {1}{x}\right ) \\ & = \sqrt {a+\frac {b}{x^2}} x-b \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {1}{\sqrt {a+\frac {b}{x^2}} x}\right ) \\ & = \sqrt {a+\frac {b}{x^2}} x-\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b}}{\sqrt {a+\frac {b}{x^2}} x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.48 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\sqrt {a+\frac {b}{x^2}} x-\frac {\sqrt {b} \sqrt {a+\frac {b}{x^2}} x \text {arctanh}\left (\frac {\sqrt {b+a x^2}}{\sqrt {b}}\right )}{\sqrt {b+a x^2}} \]

[In]

Integrate[Sqrt[a + b/x^2],x]

[Out]

Sqrt[a + b/x^2]*x - (Sqrt[b]*Sqrt[a + b/x^2]*x*ArcTanh[Sqrt[b + a*x^2]/Sqrt[b]])/Sqrt[b + a*x^2]

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.50

method result size
default \(-\frac {\sqrt {\frac {a \,x^{2}+b}{x^{2}}}\, x \left (\sqrt {b}\, \ln \left (\frac {2 b +2 \sqrt {b}\, \sqrt {a \,x^{2}+b}}{x}\right )-\sqrt {a \,x^{2}+b}\right )}{\sqrt {a \,x^{2}+b}}\) \(63\)

[In]

int((a+b/x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-((a*x^2+b)/x^2)^(1/2)*x*(b^(1/2)*ln(2*(b^(1/2)*(a*x^2+b)^(1/2)+b)/x)-(a*x^2+b)^(1/2))/(a*x^2+b)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.57 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\left [x \sqrt {\frac {a x^{2} + b}{x^{2}}} + \frac {1}{2} \, \sqrt {b} \log \left (-\frac {a x^{2} - 2 \, \sqrt {b} x \sqrt {\frac {a x^{2} + b}{x^{2}}} + 2 \, b}{x^{2}}\right ), x \sqrt {\frac {a x^{2} + b}{x^{2}}} + \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x \sqrt {\frac {a x^{2} + b}{x^{2}}}}{a x^{2} + b}\right )\right ] \]

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="fricas")

[Out]

[x*sqrt((a*x^2 + b)/x^2) + 1/2*sqrt(b)*log(-(a*x^2 - 2*sqrt(b)*x*sqrt((a*x^2 + b)/x^2) + 2*b)/x^2), x*sqrt((a*
x^2 + b)/x^2) + sqrt(-b)*arctan(sqrt(-b)*x*sqrt((a*x^2 + b)/x^2)/(a*x^2 + b))]

Sympy [A] (verification not implemented)

Time = 0.85 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.33 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\frac {\sqrt {a} x}{\sqrt {1 + \frac {b}{a x^{2}}}} - \sqrt {b} \operatorname {asinh}{\left (\frac {\sqrt {b}}{\sqrt {a} x} \right )} + \frac {b}{\sqrt {a} x \sqrt {1 + \frac {b}{a x^{2}}}} \]

[In]

integrate((a+b/x**2)**(1/2),x)

[Out]

sqrt(a)*x/sqrt(1 + b/(a*x**2)) - sqrt(b)*asinh(sqrt(b)/(sqrt(a)*x)) + b/(sqrt(a)*x*sqrt(1 + b/(a*x**2)))

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.26 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\sqrt {a + \frac {b}{x^{2}}} x + \frac {1}{2} \, \sqrt {b} \log \left (\frac {\sqrt {a + \frac {b}{x^{2}}} x - \sqrt {b}}{\sqrt {a + \frac {b}{x^{2}}} x + \sqrt {b}}\right ) \]

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="maxima")

[Out]

sqrt(a + b/x^2)*x + 1/2*sqrt(b)*log((sqrt(a + b/x^2)*x - sqrt(b))/(sqrt(a + b/x^2)*x + sqrt(b)))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (34) = 68\).

Time = 0.30 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.64 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=\frac {b \arctan \left (\frac {\sqrt {a x^{2} + b}}{\sqrt {-b}}\right ) \mathrm {sgn}\left (x\right )}{\sqrt {-b}} + \sqrt {a x^{2} + b} \mathrm {sgn}\left (x\right ) - \frac {{\left (b \arctan \left (\frac {\sqrt {b}}{\sqrt {-b}}\right ) + \sqrt {-b} \sqrt {b}\right )} \mathrm {sgn}\left (x\right )}{\sqrt {-b}} \]

[In]

integrate((a+b/x^2)^(1/2),x, algorithm="giac")

[Out]

b*arctan(sqrt(a*x^2 + b)/sqrt(-b))*sgn(x)/sqrt(-b) + sqrt(a*x^2 + b)*sgn(x) - (b*arctan(sqrt(b)/sqrt(-b)) + sq
rt(-b)*sqrt(b))*sgn(x)/sqrt(-b)

Mupad [B] (verification not implemented)

Time = 5.72 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.31 \[ \int \sqrt {a+\frac {b}{x^2}} \, dx=x\,\sqrt {a+\frac {b}{x^2}}+\frac {\sqrt {b}\,\mathrm {asin}\left (\frac {\sqrt {b}\,1{}\mathrm {i}}{\sqrt {a}\,x}\right )\,\sqrt {a+\frac {b}{x^2}}\,1{}\mathrm {i}}{\sqrt {a}\,\sqrt {\frac {b}{a\,x^2}+1}} \]

[In]

int((a + b/x^2)^(1/2),x)

[Out]

x*(a + b/x^2)^(1/2) + (b^(1/2)*asin((b^(1/2)*1i)/(a^(1/2)*x))*(a + b/x^2)^(1/2)*1i)/(a^(1/2)*(b/(a*x^2) + 1)^(
1/2))